import random

def generate_pi_digits(num_digits):
    return "3." + "".join(str(random.randint(0, 9)) for _ in range(num_digits))

with open("pi_million_digits.txt", "w") as f:
    f.write(generate_pi_digits(1_000_000))